package com.mc.fastkit.widget.queue

import android.content.Context
import androidx.annotation.UiContext
import java.lang.ref.WeakReference

/**
 * 排队处理的类型
 * @author: MasterChan
 * @date: 2025-04-09 17:31
 */
class WorkAction(
    @UiContext context: Context? = null,
    val work: (onComplete: OnWorkCompleteListener) -> Unit
) {
    val id = hashCode()
    var contextRef: WeakReference<Context>? = null

    init {
        if (context != null) {
            contextRef = WeakReference(context)
        }
    }
}